home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / Delegate.as < prev    next >
Text File  |  2013-04-24  |  682b  |  31 lines

  1. class Delegate extends Object
  2. {
  3.    function Delegate()
  4.    {
  5.       super();
  6.    }
  7.    function DelegateArgs(f)
  8.    {
  9.       this.func = f;
  10.    }
  11.    static function create(obj, func)
  12.    {
  13.       var _loc3_ = function()
  14.       {
  15.          var _loc2_ = arguments.callee.target;
  16.          func = arguments.callee.func;
  17.          var _loc3_ = arguments.callee.arg;
  18.          _loc3_ = _loc3_.concat(arguments);
  19.          return func.apply(_loc2_,_loc3_);
  20.       };
  21.       _loc3_.target = obj;
  22.       _loc3_.func = func;
  23.       _loc3_.arg = arguments.slice(2);
  24.       return _loc3_;
  25.    }
  26.    function createDelegate(obj)
  27.    {
  28.       return Delegate.create(obj,this.func);
  29.    }
  30. }
  31.